const express = require("express");

var server = express();

//目录1：/user
var routerUser = express.Router();

routerUser.get('/1.html',function (req,res) {
	// htpp://xxx.com/user/1.html
	res.send('user1');
});
routerUser.get('/2.html',function (req,res) {
	// htpp://xxx.com/user/2.html
	res.send('user2222');
});

server.use('/user',routerUser);
//目录2：/article/
var articleRouter = express.Router();
server.use('/article',articleRouter);
articleRouter.get('/101.html',function (req,res) {
	// htpp://xxx.com/user/101.html
	res.send('101快');
})



server.listen(8080);